package com.fastbee.iot.domain;

import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 设备监测对象 whhx_device_monitor
 *
 * @author kerwincui
 * @date 2021-12-16
 */
@ApiModel(value = "DeviceMonitor", description = "设备监测对象 whhx_device_monitor")
public class WhhxDeviceMonitor extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备监测ID */
    @ApiModelProperty("设备监测ID")
    private Integer id;

    /** 设备名称 */
    @ApiModelProperty("设备名称")
    @Excel(name = "设备名称")
    private String deviceName;

    /** 设备编码 */
    @ApiModelProperty("设备编码")
    @Excel(name = "设备编码")
    private String deviceCode;

    /** 设备型号 */
    @ApiModelProperty("设备型号")
    @Excel(name = "设备型号")
    private String deviceModel;

    /** 设备规格 */
    @ApiModelProperty("设备规格")
    @Excel(name = "设备规格")
    private String deviceNorm;

    /** 设备ip */
    @ApiModelProperty("设备ip")
    @Excel(name = "设备ip")
    private String gatewayId;

    /** 监测时间 */
    @ApiModelProperty("监测时间")
    @Excel(name = "监测时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "UTC")
    private LocalDateTime monitorTime;

    /** 参数名称 */
    @ApiModelProperty("参数名称")
    @Excel(name = "参数名称")
    private String parmaterName;

    /** 参数编码 */
    @ApiModelProperty("参数编码")
    @Excel(name = "参数编码")
    private String parmaterCode;

    /** 参数值 */
    @ApiModelProperty("参数值")
    @Excel(name = "参数值")
    private String parmaterValue;

    /** 创建时间 */
    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "UTC")
    private LocalDateTime createAt;

    /** 工厂ID */
    @ApiModelProperty("工厂ID")
    @Excel(name = "工厂ID")
    private Long productId;

    /** 参数报警（是或否） */
    @ApiModelProperty("参数报警（是或否）")
    @Excel(name = "参数报警（是或否）")
    private String alarm;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getDeviceModel() {
        return deviceModel;
    }

    public void setDeviceModel(String deviceModel) {
        this.deviceModel = deviceModel;
    }

    public String getDeviceNorm() {
        return deviceNorm;
    }

    public void setDeviceNorm(String deviceNorm) {
        this.deviceNorm = deviceNorm;
    }

    public String getDeviceIp() {
        return gatewayId;
    }

    public void setDeviceIp(String deviceIp) {
        this.gatewayId = deviceIp;
    }

    public LocalDateTime getMonitorTime() {
        return monitorTime;
    }

    public void setMonitorTime(LocalDateTime monitorTime) {
        this.monitorTime = monitorTime;
    }

    public String getParmaterName() {
        return parmaterName;
    }

    public void setParmaterName(String parmaterName) {
        this.parmaterName = parmaterName;
    }

    public String getParmaterCode() {
        return parmaterCode;
    }

    public void setParmaterCode(String parmaterCode) {
        this.parmaterCode = parmaterCode;
    }

    public String getParmaterValue() {
        return parmaterValue;
    }

    public void setParmaterValue(String parmaterValue) {
        this.parmaterValue = parmaterValue;
    }

    public LocalDateTime getCreateAt() {
        return createAt;
    }

    public void setCreateAt(LocalDateTime createAt) {
        this.createAt = createAt;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getGatewayId() {
        return gatewayId;
    }

    public void setGatewayId(String gatewayId) {
        this.gatewayId = gatewayId;
    }

    public String getAlarm() {
        return alarm;
    }

    public void setAlarm(String alarm) {
        this.alarm = alarm;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceName", getDeviceName())
            .append("deviceCode", getDeviceCode())
            .append("deviceModel", getDeviceModel())
            .append("deviceNorm", getDeviceNorm())
            .append("deviceIp", getDeviceIp())
            .append("monitorTime", getMonitorTime())
            .append("parmaterName", getParmaterName())
            .append("parmaterCode", getParmaterCode())
            .append("parmaterValue", getParmaterValue())
            .append("createTime", getCreateTime())
            .append("productId", getProductId())
            .append("alarm", getAlarm())
            .toString();
    }
}
